let fs = require('fs');

const schemaObj = JSON.parse(fs.readFileSync('./resources/schema_m3.json', 'utf8'));
let obj = {};
Object.keys(schemaObj).forEach(function(key){
  const newKey = ".Message" + key;
  obj[newKey] = schemaObj[key];
});
obj[".Message"] = [
  "MessageID",
  "OperationType",
  "Product",
];
obj["."] = [
    "Header",
    "MessageType",
    "PurgeAndReplace",
    "Message"
];
obj[".Header"] = [
  "DocumentVersion",
  "MerchantIdentifier",
];
module.exports = obj;